//
// Created by korack on 25-5-14.
//

#ifndef MPAPPLICATIONWINDOW_H
#define MPAPPLICATIONWINDOW_H

#include <gtkmm/applicationwindow.h>
#include <gtkmm/builder.h>
#include <gtkmm/cssprovider.h>
#include <gtkmm/button.h>

namespace Mp {

class ApplicationWindow : public Gtk::ApplicationWindow
{
public:
  ApplicationWindow(BaseObjectType *cobject,
		    const Glib::RefPtr<Gtk::Builder> &refBuilder);

  static ApplicationWindow *create();
  static void
  on_parsing_error(const Glib::RefPtr<const Gtk::CssSection> &section,
		   const Glib::Error &error);

  sigc::signal<void()> signal_on_connect_button_clicked;
  sigc::signal<void()> signal_on_disconnect_button_clicked;

  void hide_connect_button() const;

protected:
  Glib::RefPtr<Gtk::Builder> m_refBuilder;

private:
  Glib::RefPtr<Gtk::CssProvider> m_refCssProvider;

  Gtk::Button *m_connect_button;
  Gtk::Button *m_disconnect_button;

  void on_connect_button_clicked() const;
  void on_disconnect_button_clicked() const;
};

} // namespace Mp

#endif // MPAPPLICATIONWINDOW_H
